package com.gqs.bookstore.vo;

import java.io.Serializable;
import java.util.Date;

@SuppressWarnings("serial")
public class Book implements Serializable, Goods {
	private Long id = null;
	private String name = null;
	private String author = null;
	private String publisher = null;
	private Date  publishDate;
	private Double price;
	private String pic = null;
	private Long catalogId = null;
	private Integer status = null;
	private Date updateAt;
	private Date createAt;
	
	//加入购物车的时候，默认数量为1，因为在进行购物单查时，并没有把count  set进单查后的结果中，所以这里设置为一，便于第一次购物时显示为1
	private Integer count=1;//这里的数量指的是某类货物的数量，而非各种全部获物的总数量
	
	public Book() {
		super();
	}
	public Book(String name, String author, String publisher, Date publishDate,
			Double price, String pic, Long catalogId, Integer status,
			Date updateAt, Date createAt) {
		super();
		this.name = name;
		this.author = author;
		this.publisher = publisher;
		this.publishDate = publishDate;
		this.price = price;
		this.pic = pic;
		this.catalogId = catalogId;
		this.status = status;
		this.updateAt = updateAt;
		this.createAt = createAt;
	}
	public Long getId() {
		return id;
	}
	public void setId(Long id) {
		this.id = id;
	}
	public String getName() {
		return name;
	}
	public void setName(String name) {
		this.name = name;
	}
	public String getAuthor() {
		return author;
	}
	public void setAuthor(String author) {
		this.author = author;
	}
	public String getPublisher() {
		return publisher;
	}
	public void setPublisher(String publisher) {
		this.publisher = publisher;
	}
	public Date getPublishDate() {
		return publishDate;
	}
	public void setPublishDate(Date publishDate) {
		this.publishDate = publishDate;
	}
	public Double getPrice() {
		return price;
	}
	public void setPrice(Double price) {
		this.price = price;
	}
	public String getPic() {
		return pic;
	}
	public void setPic(String pic) {
		this.pic = pic;
	}
	public Long getCatalogId() {
		return catalogId;
	}
	public void setCatalogId(Long catalogId) {
		this.catalogId = catalogId;
	}
	public Integer getStatus() {
		return status;
	}
	public void setStatus(Integer status) {
		this.status = status;
	}
	public Date getUpdateAt() {
		return updateAt;
	}
	public void setUpdateAt(Date updateAt) {
		this.updateAt = updateAt;
	}
	public Date getCreateAt() {
		return createAt;
	}
	public void setCreateAt(Date createAt) {
		this.createAt = createAt;
	}
	@Override
	public String toString() {
		return "Book [id=" + id + ", name=" + name + ", author=" + author
				+ ", publisher=" + publisher + ", publishDate=" + publishDate
				+ ", price=" + price + ", pic=" + pic + ", catalogId="
				+ catalogId + ", status=" + status + ", updateAt=" + updateAt
				+ ", createAt=" + createAt + "]";
	}
	
	
	@Override
	public Integer getCount() {
		return count;
	}
	
	@Override
	public void setCount(Integer count) {
		this.count = count;
		
	}
	
}
